import HTTP from '@/http/http'
const centerApi = import.meta.env.VITE_BASE_URL

class Api extends HTTP {
  // 天气实况
  getByAreaCode(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/actualMonitoring/getByAreaCode`,
      params
    })
  }
  getWeatherFactsByCoordinate(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/actualMonitoring/getWeatherFactsByCoordinate`,
      params
    })
  }
  // 首页获取24小时的温度、天气预报
  getHome24HoursForecast(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/home24HoursForecast`,
      params
    })
  }
  // 首页获取10天的温度、天气预报
  getHome10DaysForecast(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/home10DaysForecast`,
      params
    })
  }
  // 各预警类型数量汇总
  getWarningTypeNumStatistics(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/warning/getWarningTypeNumStatistics`,
      params
    })
  }
  // 首页数据统计
  getHomeStatistics(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/actualMonitoring/getHomeStatistics`,
      params
    })
  }
}
export default new Api()
